<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich">
	<a4j:loadStyle src="/css/main.css"></a4j:loadStyle>

	<a4j:outputPanel id="cutpage" rendered="${entity['counttotal']!=null&amp;&amp;entity['counttotal']!=0}">
		<div class="manupage">
		<ul id="pages">
			<h:form>
				<li class="pageorgane"><span class="organe">${entity['counttotal']}</span>|${entity['currentpage']}/${entity['pagetotal']}</li>
				<li class="${entity['enablep']?'disablednone':'current'}"><a4j:commandLink value="|&lt;" action="${entity.cutlength}" reRender="cutpage" disabled="${entity['enablep']}">
					<f:param name="currentlength" value="1"></f:param>
					<f:param name="pagetotal" value="${entity['pagetotal']}"></f:param>
				</a4j:commandLink></li>
				<li class="${entity['enablep']?'disablednone':'current'}"><a4j:commandLink value="&lt;&lt;" action="${entity.cutlength}" reRender="cutpage" disabled="${entity['enablep']}">
					<f:param name="currentlength" value="${entity['currentlength']-1}"></f:param>
					<f:param name="pagetotal" value="${entity['pagetotal']}"></f:param>
				</a4j:commandLink></li>
				<a4j:repeat value="${entity['length']}" var="i">
					<li class="${entity['currentpage']==i?'disabled':'current'}"><a4j:commandLink  action="${backingBean.query}" value="${i}" reRender="cutpage">
					<f:param name="currentpage" value="${i}"></f:param>
					<f:param name="pagetotal" value="${entity['pagetotal']}"></f:param>
				</a4j:commandLink></li>
				</a4j:repeat>
				<li class="${entity['enablen']?'disablednone':'current'}"><a4j:commandLink value="&gt;&gt;"
					action="${entity.cutlength}" reRender="cutpage" disabled="${entity['enablen']}">
					<f:param name="currentlength" value="${entity['currentlength']+1}"></f:param>
					<f:param name="pagetotal" value="${entity['pagetotal']}"></f:param>
				</a4j:commandLink></li>
				<li class="${entity['enablen']?'disablednone':'current'}"><a4j:commandLink value="&gt;|"
					action="${entity.cutlength}" reRender="cutpage" disabled="${entity['enablen']}" >
					<f:param name="currentlength" value="${entity['totallength']}"></f:param>
					<f:param name="pagetotal" value="${entity['pagetotal']}"></f:param>
				</a4j:commandLink></li>
				<li class="current"><h:inputText styleClass="inputborder" value="${entity['gopage']}"/></li>
				<li class="current"><a4j:commandButton value="GO" action="#{backingBean.query}"
					styleClass="button" reRender="cutpage" disabled="${entity['enableGo']}">
					<f:param name="type" value="gopage"></f:param>
					<f:param name="pagetotal" value="${entity['pagetotal']}"></f:param>
					</a4j:commandButton>
					</li>
			</h:form>
		</ul>
		</div>
	</a4j:outputPanel>
</html>